<HTML>
<BODY BGCOLOR="white">
<PRE>
<FONT color="green">001</FONT>    package com.gwt.ss.client.loginable;<a name="line.1"></a>
<FONT color="green">002</FONT>    <a name="line.2"></a>
<FONT color="green">003</FONT>    import com.google.gwt.event.shared.HandlerRegistration;<a name="line.3"></a>
<FONT color="green">004</FONT>    import com.google.gwt.event.shared.HasHandlers;<a name="line.4"></a>
<FONT color="green">005</FONT>    <a name="line.5"></a>
<FONT color="green">006</FONT>    /**<a name="line.6"></a>
<FONT color="green">007</FONT>     * A interface interact with front user for processing login action, <a name="line.7"></a>
<FONT color="green">008</FONT>     * and add a {@link com.gwt.ss.client.loginable.LoginHandler LoginHandler} to receive <a name="line.8"></a>
<FONT color="green">009</FONT>     * login result.&lt;br/&gt;<a name="line.9"></a>
<FONT color="green">010</FONT>     * &lt;span style="color:red"&gt;Important:&lt;/span&gt; <a name="line.10"></a>
<FONT color="green">011</FONT>     * when {@link AbstractLoginBox#startLogin(java.lang.Throwable) start Login}}, no matter login succeeded or canceled,<a name="line.11"></a>
<FONT color="green">012</FONT>     * It must fire a {@link LoginEvent} to notify the waiting {@link LoginableService}. <a name="line.12"></a>
<FONT color="green">013</FONT>     * &lt;br/&gt;實做此界面之物件可讓用戶啟始登錄作業，並透過<a name="line.13"></a>
<FONT color="green">014</FONT>     * {@link com.gwt.ss.client.loginable.LoginHandler LoginHandler}接收登錄結果 &lt;br/&gt;<a name="line.14"></a>
<FONT color="green">015</FONT>     * &lt;span style="color:red"&gt;注意:&lt;/span&gt; 一旦{@link AbstractLoginBox#startLogin(java.lang.Throwable) 啟動登錄}，無論<a name="line.15"></a>
<FONT color="green">016</FONT>     * 登錄成功或用戶取消登錄，都一定要發送{@link LoginEvent}給等待中的{@link LoginableService}.<a name="line.16"></a>
<FONT color="green">017</FONT>     * @author Kent Yeh<a name="line.17"></a>
<FONT color="green">018</FONT>     */<a name="line.18"></a>
<FONT color="green">019</FONT>    public interface HasLoginHandler extends HasHandlers {<a name="line.19"></a>
<FONT color="green">020</FONT>        /**<a name="line.20"></a>
<FONT color="green">021</FONT>         * start login action<a name="line.21"></a>
<FONT color="green">022</FONT>         * 開始啟始登錄作業<a name="line.22"></a>
<FONT color="green">023</FONT>         * @param caught &lt;table style="padding-left:70px"&gt;&lt;tr&gt;&lt;td&gt;then reason why should start login.&lt;/td&gt;&lt;/td&gt;<a name="line.23"></a>
<FONT color="green">024</FONT>         *&lt;tr&gt;&lt;td&gt;啟動登錄作業的異常例外/td&gt;&lt;/td&gt;&lt;/table&gt;<a name="line.24"></a>
<FONT color="green">025</FONT>         */<a name="line.25"></a>
<FONT color="green">026</FONT>        public void startLogin(Throwable caught);<a name="line.26"></a>
<FONT color="green">027</FONT>        /**<a name="line.27"></a>
<FONT color="green">028</FONT>         * Accept {@link LoginHandler} to handle {@link LoginEvent}&lt;br/&gt;<a name="line.28"></a>
<FONT color="green">029</FONT>         * 接受 {@link LoginHandler} 以處理 {@link LoginEvent}<a name="line.29"></a>
<FONT color="green">030</FONT>         */<a name="line.30"></a>
<FONT color="green">031</FONT>        public HandlerRegistration addLoginHandler(LoginHandler handler);<a name="line.31"></a>
<FONT color="green">032</FONT>    }<a name="line.32"></a>




























































</PRE>
</BODY>
</HTML>
